var express = require('express');
var router = new express.Router();
var Mock = require('mockjs')
var dataDicts=require('./data/dataDicts')


router.get('/list', function (req, res) {

  res.send(dataDicts);

})

var dataDict=[]

router.get('/add',function (request,response) {
  console.log(request.query);
  if(request.query.id==-1){
    dataDict.unshift(request.query)
  }else {

  }
  response.send({
    dat:dataDict,
    flag: true
  })
})



module.exports= router;
